if __name__ == '__main__':
    times = 2
    i = 5
    primes = [3]
    while times < 10001:
        flag = 1
        for j in primes:
            if j > int(pow(i, 0.5)):
                break
            if i % j == 0:
                flag = 0
        if flag == 1:
            times += 1
            primes.append(i)
        i += 2
    print(times)
    print(primes[len(primes) - 1])